package com.tl.sboot.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.google.gson.Gson;
import com.tl.sboot.entity.StkComDistChng;
import com.tl.sboot.service.StkComDistChngService;

@RestController
public class StkComDistChngController {
	
	@Autowired
	StkComDistChngService stkComDistChngService;
	
	@RequestMapping(value="/scdcList",method = RequestMethod.GET)
	public List<StkComDistChng> findScdc(){
		List<StkComDistChng> stkComDistChngs = stkComDistChngService.stkComDistChngs();
		return stkComDistChngs;
	}
	/**
	 * 根据参数获取数据
	 * @return
	 */
	@RequestMapping(value="/parByScdcList/{parListJson}",method = RequestMethod.GET)
	public List<StkComDistChng> parByScdcList(@PathVariable String parListJson){
		return stkComDistChngService.findByParSCCM(parListJson);
	}
}
